/*
 *  Copyright (C) 2010:
 *                 Buzzanca Marco <marco.bzn@gmail.com>
 *         Monaco Davide Giuseppe <black.ralkass@gmail.com>
 *              Petralia Veronica <veronicapetralia@gmail.com>
 *
 * This file is part of DS2011BMP
 *
 * DS2011BMP is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * DS2011BMP is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

/**
 * @file taskdescriptor.cpp
 * @author Davide Giuseppe Monaco
 *
 * This file contains TaskDescriptor class implementation.
 */

#include "taskdescriptor.h"

TaskDescriptor::TaskDescriptor(void)
  : _ID(-1) { }

TaskDescriptor::TaskDescriptor(int id)
  : _ID(id) { }

TaskDescriptor::TaskDescriptor(int ID, TaskTYPE type, const std::string& cmd,
                               const std::string& link)
  : _ID(ID) , _type(type) , _command(cmd) , _link(link) { }

TaskDescriptor::~TaskDescriptor() { }

int TaskDescriptor::getID(void) const
{
  return _ID;
}

void TaskDescriptor::setID(int val)
{
  _ID = val;
}

TaskTYPE TaskDescriptor::getType(void) const
{
  return _type;
}

void TaskDescriptor::setType(TaskTYPE val)
{
  _type = val;
}

const std::string& TaskDescriptor::getCommand(void) const
{
  return _command;
}

void TaskDescriptor::setCommand(const std::string& val)
{
  _command = val;
}

const std::string& TaskDescriptor::getLink(void) const
{
  return _link;
}

void TaskDescriptor::setLink(const std::string& val)
{
  _link = val;
}

std::ostream& operator << (std::ostream& os, const TaskDescriptor& ts)
{
  os << "ID: " << ts._ID
     << "; TYPE: " << ts._type 
     << "; COMMAND: " << ts._command
     << "; LINK: " << ts._link;

  return os;
}
